PHP installation of GeoIP extension based on the IP address to obtain the geographic location and calculation distance method, geoip geographic location
Obtain the visitor's country, city, and latitude and longitude Based on the IP addressInstall GeoIP extension:
sudo apt-get install libgeoip-dev
pecl install geoip-1.1
Recently installed Nginx Geo module in the compilation of Nginx encountered an error, error information as follows:Checking for OpenSSL Library ... foundchecking for zlib library ... foundchecking for GeoIP library ... not foundchecking For GeoIP library in/usr/local/... not foundchecking for GeoIP library in/usr/pkg/... not foundchecking for
reasons for using the GeoIP module (why): Requests are forwarded to customers in different cities for the needs of the project, eg:When Tianjin User A visited www.XXXX.com, Nginx forwarded this request to the Tianjin server and the domain name of Tianjin, the browser automatically jump tj.XXXX.comWhen Guangzhou User B visited www.XXXX.com, Nginx forwarded this request to the server in Guangzhou and the domain name of Guangzhou, the browser automatical
GeoIP introduction:What is GepIP?
GeoIP is used to locate the geographical longitude and latitude of a visitor, country/region, province/city, or even Street. The technology here is not difficult. The key is to have a precise database. With accurate data sources, you can earn a small amount of money for odd goods. However, it is our pursuit to promote the spirit of cooperation and make a collective contribu
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country/region, provinces and cities, and even streets and other location information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to carry forward the spirit of cooperation, collective co
Recently there is a Web site project requirements: the need to block domestic requests. Take the time to study the information in this area. The best way to find it now is to use the Nginx GeoIP module to realize the region's identification. Then configure the relevant country's ISO name and prohibit access. Record the relevant process.
Compiling GEOIP components
Maxmind provides a free version of the dat
GeoIP PHP extension installation and configuration, geoipphp Extension Configuration
Author: zhanhailiang Date:
1. Install GeoIP-devel and GeoIP Dependencies
GeoIP-devel.x86_64 : Development headers and libraries for GeoIPGeoIP.x86_64 : Library for country/city/organization to IP address or hostname mapping
yum install
Wireshark Data capture Teaching installation Wireshark installation WiresharkThe previous section of the study can be based on your own operating system to download the installation of Wireshark. This book has been developed 1.99.7 (Chinese version) mainly, the following describes the installation of Wireshark on Windo
Wireshark data packet capture tutorial-installing WiresharkWireshark data packet capture tutorial-install Wireshark learn how to download and install Wireshark based on your operating system in the previous section. This book focuses on the development version 1.99.7 (Chinese version). The following describes how to install W
GeoIP Introduction:What is GEPIP?
The so-called GeoIP, is through the visitor's IP, positioning his latitude and longitude, country, provinces and cities, and even the location of the street information. The technology is not a problem, the key is to have a precise database. With accurate data sources on the enjoy high earn a little money, but to develop a spirit of cooperation, collective contribution to t
Transferred from: http://www.21andy.com/blog/20100405/1799.html
There are 2 standard methods of using GeoIP
The first method:Download the GeoIP data file first
Wget-c http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gzGunzip GeoIP.dat.gz
Then download GeoIP PHP file, save
This article mainly introduces the use of GeoIP Library instances in php. This article provides code instances subdivided into countries and cities, for more information, see maxmind, which is the provider of the geoip database,
Sample and api instructions in many languages are also provided.
For example, php and php's geoip library are quite different, including
GeoIP + PHP Usage
Method One:
Download GeoIP PHP file Geoip.inc, save as Geoip.inc.php
Http://sjolzy.cn/php/GeoIP/bak/geoip.inc
PHP uses code
Note: If you test locally because $_server[' remote_addr ' and $_server[' REMOTE_ADDR '] may be 127.0.0.1, the output content is empty. Can bring in the IP test yourself
Method Two:
Installing
How to Use DNS + geoip + nginx + varnish as a world-class CDN
How to use bind, geoip, nginx, and varnish to create your own efficient CDN network?CDN stands for content distrubtion Network, which is a content delivery network. In short, it refers to Server Load balancer in all regions. The concept of a whole region can be national or global. The unified DNS server performs address forwarding and selects the
To use GeoIP, you need to recompile nginx, my system is centos6.5,nginx with Tengine, the required package:GCC, gcc-c++, OpenSSL, Openssl-devel, GeoIP Library, GeoLite Country, GeoLite City, Pcre, Tengine21. Download the required Packageswget http://tengine.taobao.org/download/tengine-2.0.3. Tar.gzwget http://geolite.maxmind.com/download/ geoip/database/GeoLiteCi
The Nginx Access log we collected through Logstash already contains the data for the client IP (REMOTE_ADDR), but only this IP is not enough, the location of the Kibana to display the requested source needs to be implemented by GEOIP database. GeoIP is the most common free IP address classification query library, but also has a pay version can be purchased. GeoIP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.